package com.neusoft.model;

import lombok.Data;

import java.util.List;

@Data
public class PageModel<T> {

    private List<T> records;

    private long total;

    private int pageNum;

    private int pageSize;

    private int count;

    public PageModel(int pageNum, int pageSize) {
        this.pageNum = pageNum;
        this.pageSize = pageSize;
    }

    public void setRecords(List<T> records) {
        this.records = records;
        this.count = records.size();
    }
}
